import SdkEvent from "../SdkEvent";
import AdAdapter from "./AdAdapter";

export class SelfAdAdapter extends AdAdapter {
    protected loadListener: SdkEvent = new SdkEvent()
    protected errorListener: SdkEvent = new SdkEvent();
    protected closeListener: SdkEvent = new SdkEvent()
    onLoad(func: Function) {
        this.loadListener.on(func)
    }

    offLoad(func: Function) {
        this.loadListener.off(func)
    }

    onError(func: Function) {
        this.errorListener.on(func)
    }
    offError(func: Function) {
        this.errorListener.off(func)
    }

    onClose(func: Function) {
        this.closeListener.on(func)
    }

    offClose(func: Function) {
        this.closeListener.off(func)
    }
}